<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        #app{
            text-align: center;
        }
        .shu{
            width: 240px;
            height: 40px;
            box-sizing: border-box;
            outline: none;
            padding-left: 10px;
        }
        .but{
            width: 70px;
            border-radius: 0;
            border: none;
            height: 40px;
            cursor: pointer;
        }
        ul{
            /* text-align: center; */
            list-style: none;
        }
    </style>
</head>
<body>
    <div id="app">
        <h2>待办事项</h2>
        <div>
            <input class="shu" type="text" v-model="text" @keydown.enter="add()" placeholder="请输入待办事项(确认或回车添加)"><button class="but" @click="add()">确定</button>
        </div>
        <div>
            <h3>未完成事件{{weinum}}</h3>
            <ul v-for="(val,index) in school">
                <li v-if="val.ischeck==false"><input type="checkbox" v-model="val.ischeck"> {{val.title}}<button @click="school.splice(index,1)">X</button></li>
            </ul>
        </div>
        <div>
            <h3>已完成事件{{wcnum}}</h3>
            <ul v-for="(val,index) in school">
                <li v-if="val.ischeck"><input type="checkbox" v-model="val.ischeck"> {{val.title}} <button  @click="school.splice(index,1)">X</button></li>
            </ul>
        </div>
    </div>
    <script src="./node_modules/vue/dist/vue.js"></script>
    <script src="./js/待办事项.js"></script>
</body>
</html>